<?php
        if(Yii::app()->user->hasFlash(get_class($model)))
        {
                $flash = Yii::app()->user->getFlash(get_class($model));
                $pos = strpos($flash, '#');
                $class = ($pos === FALSE) ? 'flash-success' : strstr($flash, '#', TRUE);
                $text = ($pos === FALSE) ? $flash : substr($flash, $pos + 1);
 
                echo('<div class="'.$class.'">'.$text.'</div>');
        }
?>
